<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>乘客用车首页</title>
    <link rel="stylesheet" href="UC_style.css">
    <style>
        .iframe1 {
            width: 100%;
            height: 800px;
            background: white;
            float: left;
        }
        * {
            margin: 0;
            padding: 0;
        }
        .main {
            width: 83%;
            height: 800px;
            background: RGB(239,239,239);
            float: left;
        }

        #header1 {
            height: 40px;
            background: black;
        }
        .left {
            width: 17%;
            height: 844px;
            background: RGB(30,35,45);
            float: left;
            text-align: center;
        }
        #footer {
            clear: both;
            height: 50px;
            background: gray;
        }

        h1 {
            font-size: 30px;
            color: white;
            font-family: "宋体";
            padding: 20px 5px;
        }
        .button1 {
            background-color: RGB(46,54,62);
            border-width: 1px;
            color: white;
            padding: 15px 32px;
            width: 100%;
            text-align: left;
            font-size: 16px;
        }

            .button1:hover {
                background-color: #CFD2E0;
            }

        .button2 {
            background-color: RGB(23,28,33);
            border-width: 1px;
            color: white;
            padding: 15px 32px;
            width: 100%;
            text-align: left;
            font-size: 16px;
        }

            .button2:hover {
                background-color: RGB(40,183,121);
            }
        .div_button {
            width: 100%;
            background: RGB(30,35,45);
            float: left;
            text-align: center;
            display: none;
        }
        a:link {
            text-decoration: none;
            color: white;
            position: absolute;
            left: 90%;
            top:5px;
        }
        a:hover {
            color:blue;
        }
        .input1 {
            background-color: black;
            color: white;
            border: none;
            position: absolute;
            left: 87%;
            top: 7px;
            font-size:16px;
        }
        .input1:hover{
            color:#0094ff;
        }
    </style>
<script src="jquery.js"></script>
    <script>
    $(function(){
        
        $('#back').click(function(){ 
        	if(confirm('确定要退出登录吗？')){ 
        		 window.location.href = "C-login.jsp";
        	} 
        });
    });
    
</script>
</head>
<body>
<%
	String EmpID=(String)session.getAttribute("EmpID");
	//System.out.println("EmpID1:"+EmpID);
%>
    <div class="left">
        <h1>乘客用车管理</h1>
        <form action="">
            <input type="button" class="button1" name="当前用车" value="当前用车" onclick="next('当前用车')"><br />
            <input type="button" class="button1" name="申请用车" value="申请用车" onclick="next('申请用车')"><br />
            <input type="button" class="button1" name="用车记录" value="用车记录" onclick="next('用车记录')"><br />
            <input type="button" class="button1" name="服务评价" value="服务评价" onclick="next('服务评价')"><br />
        </form>
    </div>  
    
    <div class="main">
        <div id="header1">
             <form action="X-UseCar_PersonalInformation.jsp" method="get" target="UseCar">
	             <input type="submit" class="input1" name="个人信息" value="个人信息" onclick="next('个人信息')" style="margin-right:40px;">
	             <input type="hidden" name="EmpID" value=<%=EmpID %>>
	             <button class="button_header1" id="back">
					<img src="img/back.png" alt="Big Boat" width="20" height="20" style="float:center;border-radius:50px;">
				</button>
         	 </form>				
        </div>
        <iframe id="iframe1" class="iframe1" name="UseCar" src="X-UseCar_Current.jsp?EmpID=<%= EmpID %>"></iframe>
    </div>
    <script>

        function next(a) {

            if (a == "申请用车")
                document.getElementById("iframe1").src = "X-UseCar_CheckList.jsp?EmpID=<%= EmpID %>";
            if (a == "当前用车")
                document.getElementById("iframe1").src = "X-UseCar_Current.jsp?EmpID=<%= EmpID %>";
            if (a == "用车记录")
                document.getElementById("iframe1").src = "X-UseCar_Records.jsp?EmpID=<%= EmpID %>";
            if (a == "服务评价")
                document.getElementById("iframe1").src = "X-UseCar_Service.jsp?EmpID=<%= EmpID %>";
            if (a == "个人信息")
                document.getElementById("iframe1").src = "X-UseCar_PersonalInformation.jsp?EmpID=<%= EmpID %>";
        }

    </script>
</body>
</html>